﻿@page "/template-component"
@using BlazorApp.Components;
@using BlazorApp.Data;

<h3>模板化组件</h3>

<TableTemplate Items="pets">
    <TableHeader>
        <th>ID</th>
        <th>Name</th>
    </TableHeader>
    <RowTemplate Context="peta">
        <td>@peta.Id</td>
        <td>@peta.Name</td>
    </RowTemplate>
</TableTemplate>

@code {
    private List<Pet> pets = Pet.GetData();
}